This document describes how to replicate the figures and tables included in the article 'Perceived inequality as an impediment to mass taxation: Evidence from Latin America'.
Author: Guy Heilbrun

The analysis was made using R version 4.4.1 (R Core Team, 2024).


* The main analysis can be replicated using the files 'taxbase' (R file) and 'actual_inequality' (csv file) and by downloading publicly available data sets. 

The file 'taxbase' includes the code used to produce the vast majority of the figures and tables in the article. The file 'actual_inequality' contains information on the share of income held by each quintile based on World Bank (2022) data. Both files should be saved in the same folder, as well as the following publicly available data sets:
1) Latinobarómetro 2020 survey data (Latinobarómetro Corporation, 2020), available at: https://www.latinobarometro.org/latContents.jsp (the file needed for replication is the Rdata file in the English version). 
2) For the replication of Table 3 and Table 20 only, Encuesta Desigualdades Ecónomicas y Sociales (Desiguales) 2016 survey data (PNUD, 2017), available at: https://www.estudiospnud.cl/bases-de-datos/desigualdades-economicas-y-sociales-desiguales-2016/ (the file needed for replication is the csv file).

* The replication of Figure 1 can be made using the files 'gdpred' and 'figure1'. The former is a RDS file that contains data on inequality and redistribution from version 9.2 of the Standardised World Income Inequality Database (Solt, 2019) and GDP per capita in constant 2015 US$ (World Bank, 2023) in the years 2017--2019 (the latest for each country). The latter is a R file that includes the code used to create Figure 1. Both files should be saved in the same folder.

------------
References:
Latinobarómetro Corporation. (2020). Latinobarómetro 2020. https://www.latinobarometro.
org/latOnline.jsp
PNUD. (2017). Encuesta Desigualdades Ecónomicas y Sociales (Desiguales) 2016. https://www.estudiospnud.cl/bases-de-datos/desigualdades-economicas-y-sociales-desiguales-2016/
Solt, F. (2019). The Standardized World Income Inequality Database, Versions 8-9. Harvard Dataverse. https://doi.org/10.7910/DVN/LM4OWF
R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. Vienna, Austria. https://www.R-project.org
World Bank. (2022). World Development Indicators (WDI). https://databank.worldbank.org/source/world-development-indicators
World Bank. (2023). World Development Indicators (WDI). https://databank.worldbank.org/source/world-development-indicators









